package uml.structural.composite;

/**
 * 组合模式--抽象叶子节点构件<br>
 * on 2022/12/25 0:47
 */
public abstract class LeafFile implements AbstractFile {
    protected String fileName;

    protected LeafFile(String fileName) {
        this.fileName = fileName;
    }

    @Override
    public void addChild(AbstractFile file) {
        System.out.println("文件节点不支持该操作");
    }

    @Override
    public void removeChild(AbstractFile file) {
        System.out.println("文件节点不支持该操作");
    }

    @Override
    public AbstractFile getChild(int index) {
        System.out.println("文件节点不支持该操作");
        return null;
    }
}
